<?php
/**
 * Created by JetBrains PhpStorm.
 * User: QuangRau
 * Date: 9/10/12
 * Time: 7:45 PM
 * To change this template use File | Settings | File Templates.
 */
class Plun_Model_User
{
    /**
     * insert new user info
     * @static
     * @param $params
     * @return mixed
     * @throws Plun_Exception
     */
    public static function insertUserInfo($params)
    {
        try {
            return Plun_Business_User::insertUserInfo($params);
        } catch (Exception $e) {
            throw new Plun_Exception($e->getMessage(), $e->getCode());
        }
    }

    /**
     * Get user info by user_id
     * @static
     * @param $params
     * @return mixed
     * @throws Plun_Exception
     */
    public static function getUserInfo($params)
    {
        try {
            return Plun_Business_User::getUserInfo($params);
        } catch (Exception $e) {
            throw new Plun_Exception($e->getMessage(), $e->getCode());
        }
    }

    /**
     * Check user login
     * @static
     * @param $params
     * @return mixed
     * @throws Plun_Exception
     */
    public static function checkUserLogin($params)
    {
        try {
            return Plun_Business_User::checkUserLogin($params);
        } catch (Exception $e) {
            throw new Plun_Exception($e->getMessage(), $e->getCode());
        }
    }
}
